<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');

/**
 * 角色定义（用户组）
 */
define('ROLE_TRADEMARK_AGENT', 1); // 国内商标代理人组
define('ROLE_TRADEMARK_FLOW', 2); // 国内商标流程组
define('ROLE_PATENT_AGENT', 3); // 国内专利代理人组
define('ROLE_PATENT_FLOW', 4); // 国内专利流程组
define('ROLE_FOREIGN_RELATED', 5); // 涉外事务组
define('ROLE_FINANCE', 6); // 财务组
define('ROLE_ADMINISTRATOR', 7); // 管理员组


/**
 * 案件类型 case_type
 */
define('CT_ZCSQ', '注册申请');
define('CT_ZRSQ', '转让申请');
define('CT_BGSQ', '变更申请');
define('CT_XZSQ', '续展申请');
define('CT_BFZCZ', '补发注册证');
define('CT_CHSQ', '撤回申请');
define('CT_GZSQ', '更正申请');
define('CT_TGYXQ', '提供优先权');
define('CT_TGZCZM', '提供注册证明');
define('CT_XKBA', '许可备案');
define('CT_BHFS', '驳回复审');
define('CT_CSSQ', '撤三申请');
define('CT_CSFS', '撤三复审');
define('CT_CSFSDB', '撤三复审答辩');
define('CT_CSDB', '撤三答辩');
define('CT_YYDB', '异议答辩');
define('CT_YYFS', '异议复审');
define('CT_YYFSDB', '异议复审答辩');
define('CT_YYSQ', '异议申请');
define('CT_ZYSQ', '争议申请');
define('CT_ZYDB', '争议答辩');
define('CT_QTSQ', '其他申请');
define('CT_QTAJ', '其他案件');

/**
 * 案件类型对应的view
 */
define('CTV_APPLICATION', 'application');
define('CTV_TRANSFER', 'transfer');
define('CTV_CHANGE', 'change');
define('CTV_RENEWAL', 'renewal');
define('CTV_OTHER', 'other');
define('CTV_CASE', 'case');

/**
 * 涉外业务案件类型
 */
define('FCT_SBSQ', '商标申请');
define('FCT_SBZR', '商标转让');
define('FCT_SBBG', '商标变更');
define('FCT_SBXZ', '商标续展');
define('FCT_SBBZ', '商标补证');
define('FCT_SBCX', '商标查询');
define('FCT_MDLSQ', '马德里申请');
define('FCT_MDLHQZD', '马德里后期指定');
define('FCT_ECFF', '二次付费');
define('FCT_TGSYZJ', '提供使用证据');
define('FCT_SBFS', '商标复审');
define('FCT_MDLFS', '马德里复审');
define('FCT_SBYY', '商标异议');
define('FCT_SBYYDB', '商标异议答辩');
define('FCT_SBQT', '商标其他');
define('FCT_FMZL', '发明专利');
define('FCT_XXZL', '新型专利');
define('FCT_WGZL', '外观专利');
define('FCT_ZLBD', '专利办登');
define('FCT_ZLNF', '专利年费');
define('FCT_ZLSS', '专利实审');
define('FCT_ZLFY', '专利翻译');
define('FCT_ZLQT', '专利其他');

/**
 * 涉外业务案件类型对应的view
 */
define('FCTV_TRADEMARK', 'trademark');
define('FCTV_TRADEMARK_OTHER', 'trademark_other');
define('FCTV_PATENT', 'patent');
define('FCTV_PATENT_OTHER', 'patent_other');

/**
 * 限时提醒，relation_id前缀
 */
define('RM_R_TRADEMARK', 'tm_');
define('RM_R_FOREIGN', 'f_');

/**
 * 官方文件，relation_id前缀
 */
define('DOC_R_TRADEMARK', 'tm_');
define('DOC_R_FOREIGN', 'f_');
define('DOC_R_CLIENT', 'c_');

/**
 * 上传文件目录
 */
define('UPLOAD_DIR', 'uploads');

/**
 * 替代目录分隔符
 */
define('DIR_SEPARATOR', '_');

/* End of file constants.php */
/* Location: ./application/config/constants.php */